﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.Reflection;

namespace Asd.MP.AppService
{
    [ServiceContract]
    public interface ICoreServer
    {
        [OperationContract]
        string DoWork(string method, object[] args);
    }

    public class CoreServer : ICoreServer
    {

        public virtual string DoWork(string method, object[] args)
        {
            Type t = this.GetType();
            return t.GetMethod(method).Invoke(this, args) as string;
        }

    }
}